MondbDB
安装MongoDB:
$ brew tap mongodb/brew
$ brew install mongodb-community@4.0
$ mongod --config /usr/local/etc/mongod.conf
$ tail -f /usr/local/var/log/mongodb/mongo.log
参考官网:https://docs.mongodb.com/v4.0/tutorial/install-mongodb-on-os-x/
实际安装路径:/usr/local/Cellar/mongodb-community/4.2.0
bin目录:/usr/local/bin //软链接方式
配置文件:/usr/local/etc/mongod.conf
数据目录:/usr/local/var/mongodb
日志路径:/usr/local/var/log/mongodb
启动MongoDB
$ mongod --config /usr/local/etc/mongod.conf
卸载MongoDB
$ brew uninstall mongodb-community
Redis
安装Redis:
$ brew install redis
实际安装路径:/usr/local/Cellar/redis/5.0.6
bin目录:/usr/local/bin //软链接方式
配置文件:/usr/local/etc/redis.conf
数据目录:/usr/local/var/db/redis/
日志文件:/usr/local/var/log/redis.log
启动Redis
$ redis-server /usr/local/etc/redis.conf
卸载Redis
$ brew uninstall redis
Nginx
安装Nginx:
$ brew install nginx
实际安装路径:/usr/local/Cellar/nginx/1.17.3_1
bin目录:/usr/local/bin //这里使用的是软链接,实际路径在:/usr/local/Cellar/nginx/1.17.3_1/bin
www路径:/usr/local/var/www //静态文件存放路径
配置文件目录:/usr/local/etc/nginx //配置入口文件nginx.conf存放目录
子站配置文件路径:/usr/local/etc/nginx/servers/ //nginx默认会加载这个目录下所有配置文件,路径可以在nginx.conf中修改
日志目录:/usr/local/var/log/nginx
启动Nginx:
$ nginx
卸载Nginx
$ brew uninstall nginx